//
//  Utils.h
//  QrcodeScanner
//
//  Created by Nguyen Cong Huy on 9/13/14.
//  Copyright (c) 2014 FreeAppForYou. All rights reserved.
//

#import <Foundation/Foundation.h>

#define SYSTEM_VERSION_EQUAL_TO(v)                  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v)              ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v)                 ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)

#define RGBACOLOR(r, g, b, a) [UIColor colorWithRed:((float)r/255.0f) green:((float)g/255.0f) blue:((float)b/255.0f) alpha:((float)a/255.0f)]
#define RGBCOLOR(r, g, b) RGBACOLOR(r, g, b, 255.0f)

@interface Utils : NSObject

+ (void)sendTrackWithCategory:(NSString*)category action:(NSString*)action label:(NSString*)label value:(NSNumber*)value;

@end
